<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>templi php 框架: DB类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">templi php 框架
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>函数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classDB-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">DB类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 DB 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classDB.png" usemap="#DB_map" alt=""/>
  <map id="DB_map" name="DB_map">
<area href="classMysql.html" alt="Mysql" shape="rect" coords="0,56,74,80"/>
<area href="classPdo__Mysql.html" alt="Pdo_Mysql" shape="rect" coords="84,56,158,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a87e38c19bba81f11b924f90c66da1580"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a87e38c19bba81f11b924f90c66da1580">__construct</a> ($config)</td></tr>
<tr class="separator:a87e38c19bba81f11b924f90c66da1580"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ef9b95ebe1b9b68ac283eeea4c81a7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a39ef9b95ebe1b9b68ac283eeea4c81a7">connect</a> ()</td></tr>
<tr class="separator:a39ef9b95ebe1b9b68ac283eeea4c81a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd6ab4b3dd52383693b0e6cdb57ffe4c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#acd6ab4b3dd52383693b0e6cdb57ffe4c">query</a> ($sql)</td></tr>
<tr class="separator:acd6ab4b3dd52383693b0e6cdb57ffe4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8bc5b35c617401569975e4e8c6a7fa7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#ad8bc5b35c617401569975e4e8c6a7fa7">execute</a> ($sql)</td></tr>
<tr class="separator:ad8bc5b35c617401569975e4e8c6a7fa7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e77e76fd0a03352cef29d4e7307302e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a3e77e76fd0a03352cef29d4e7307302e">insert_id</a> ()</td></tr>
<tr class="separator:a3e77e76fd0a03352cef29d4e7307302e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:abac8b204ab63abcf1c60b1d82fb410b4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abac8b204ab63abcf1c60b1d82fb410b4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$prefix</b> = ''</td></tr>
<tr class="separator:abac8b204ab63abcf1c60b1d82fb410b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4a347a6234760e7c29c5b01b2f70707"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4a347a6234760e7c29c5b01b2f70707"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$table_name</b> =''</td></tr>
<tr class="separator:aa4a347a6234760e7c29c5b01b2f70707"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a8f1b42482889d24462c21da37724caa1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDB.html#a8f1b42482889d24462c21da37724caa1">error_msg</a> ($message='', $sql='')</td></tr>
<tr class="separator:a8f1b42482889d24462c21da37724caa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a1df8074e4455e10d921cf27b4d610c4a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1df8074e4455e10d921cf27b4d610c4a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$dbname</b> =''</td></tr>
<tr class="separator:a1df8074e4455e10d921cf27b4d610c4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79a077beb434fc3e44334f161bae070e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a79a077beb434fc3e44334f161bae070e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$last_sql</b> =''</td></tr>
<tr class="separator:a79a077beb434fc3e44334f161bae070e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb4ac7c2d1cd7d604544ea9fe2b4bde2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb4ac7c2d1cd7d604544ea9fe2b4bde2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$dbhost</b> = ''</td></tr>
<tr class="separator:adb4ac7c2d1cd7d604544ea9fe2b4bde2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30827030d00a364a4b74c927b4255a9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30827030d00a364a4b74c927b4255a9c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$dbuser</b> = ''</td></tr>
<tr class="separator:a30827030d00a364a4b74c927b4255a9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73f2a6d060aaa8a3021a4d4761c14fa7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73f2a6d060aaa8a3021a4d4761c14fa7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$dbpsw</b> = ''</td></tr>
<tr class="separator:a73f2a6d060aaa8a3021a4d4761c14fa7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa20e89c27f8b441de76b3b3c406bb572"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa20e89c27f8b441de76b3b3c406bb572"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$charset</b> = 'utf8'</td></tr>
<tr class="separator:aa20e89c27f8b441de76b3b3c406bb572"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae09312de84c51599dab58305edd1579b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae09312de84c51599dab58305edd1579b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>$pconnect</b> = 0</td></tr>
<tr class="separator:ae09312de84c51599dab58305edd1579b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>mysql数据库操作类 </p>
<dl class="section author"><dt>作者</dt><dd>七觞酒  <a href="#" onclick="location.href='mai'+'lto:'+'739'+'80'+'060'+'0@'+'qq.'+'co'+'m'; return false;">73980<span style="display: none;">.nosp@m.</span>0600<span style="display: none;">.nosp@m.</span>@qq.c<span style="display: none;">.nosp@m.</span>om</a> </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2013-1-19 </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a87e38c19bba81f11b924f90c66da1580"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DB::__construct </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$config</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>构造函数 连接数据可 </p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a39ef9b95ebe1b9b68ac283eeea4c81a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB::connect </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">abstract</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>数据库连接 </p>

</div>
</div>
<a class="anchor" id="a8f1b42482889d24462c21da37724caa1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB::error_msg </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$message</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$sql</em> = <code>''</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>输出错误提示信息 </p>

</div>
</div>
<a class="anchor" id="ad8bc5b35c617401569975e4e8c6a7fa7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB::execute </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$sql</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">abstract</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>执行mysql instert update 语句 并返回影响行数 </p>

</div>
</div>
<a class="anchor" id="a3e77e76fd0a03352cef29d4e7307302e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB::insert_id </td>
          <td>(</td>
          <td class="paramname">)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">abstract</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取最后一次添加数据的主键号 </p>

</div>
</div>
<a class="anchor" id="acd6ab4b3dd52383693b0e6cdb57ffe4c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DB::query </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$sql</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">abstract</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>执行基本的 mysql查询 并返回结果集 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>templi/Model/DB.class.php</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 一月 15日 星期三 15:42:01 , 为 templi php 框架使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
